package mya_dc.shared_classes;

import java.io.Serializable;


/**
 * A class that represent a user name and project name tuple.
 * 
 * @param sUserName - User name.
 * @param sProjectName - Project name.
 */
public class UserProject implements Serializable
{
	private static final long serialVersionUID = 1L;
	public UserProject(String sUserName, String sProjectName)
	{
		m_sUserName = sUserName;
		m_sProjectName = sProjectName;
	}
	@Override public boolean equals(Object obj)
	{
		if (obj instanceof UserProject)
		{
			UserProject CompareTo = (UserProject) obj;
			if ((CompareTo.m_sProjectName.equals(m_sProjectName)) &&
				(CompareTo.m_sUserName.equals(m_sUserName)))
			{
				return true;
			}
			return false;	
		}
		return false;
	};
	@Override public int hashCode() 
	{
		return (m_sUserName.hashCode() + m_sProjectName.hashCode()) / 2;
	};
	public String m_sUserName;
	public String m_sProjectName;
}